// let person = {name: "张三丰", sex: "男", age: 128, height: 154,
//     sayHello (){
//         console.log("hello")
//     }};
// console.log(person)
// console.log(person.name)
// console.log(person["sex"])
//
// person.sayHello();

// function Person(name, sex, age, height) {
//     this.name = name;
//     this.sex = sex;
//     this.age = age;
//     this.height = height;
//     this.sayHello = function () {
//         console.log("hello")
//     }
// }

class Person{
    constructor(name, sex, age, height) {
        this.name = name;
        this.sex = sex;
        this.age = age;
        this.height = height;
    }

    sayHello(){
        console.log("hello")
    }
}

let zsf = new Person("张三丰","男",128,154);
console.log(zsf)
zsf.sayHello()